﻿using System;
using Dexter.Domain.Model;
using Dexter.Domain.Results;

namespace Dexter.Repository {
	public interface ILegacyUrlRepository : IRepository<LegacyUrl> {
		///<summary>
		///	Return a list of <see cref="LegacyUrl"/> with all properties loaded.
		///</summary>
		///<param name = "pageIndex">Index of the page (0 based).</param>
		///<param name = "pageSize">The number of items to retrieve.</param>
		///<returns>An concrete implementation of <see cref="IPagedResult{T}"/>. The result will never be null.</returns>
		///<exception cref="ArgumentOutOfRangeException"> If <paramref name="pageIndex"/> is lesser than 0.</exception>
		///<exception cref="ArgumentOutOfRangeException"> If <paramref name="pageSize"/> is lesser than 1.</exception>
		IPagedResult<LegacyUrl> GetListPaged(int pageIndex, int pageSize);

		///<summary>
		///	Return a list of <see cref="LegacyUrl"/> with all properties loaded.
		///</summary>
		///<param name = "pageIndex">Index of the page (0 based).</param>
		///<param name = "pageSize">The number of items to retrieve.</param>
		/// <param name="enableTracking">if set to <c>true</c> the tracking system of the return object will be enable.</param>
		///<returns>An concrete implementation of <see cref="IPagedResult{T}"/>. The result will never be null.</returns>
		///<exception cref="ArgumentOutOfRangeException"> If <paramref name="pageIndex"/> is lesser than 0.</exception>
		///<exception cref="ArgumentOutOfRangeException"> If <paramref name="pageSize"/> is lesser than 1.</exception>
		IPagedResult<LegacyUrl> GetListPaged(int pageIndex, int pageSize, bool enableTracking);

		/// <summary>
		/// 	Saves the specified <see cref="LegacyUrl"/> into the repository.
		/// </summary>
		/// <param name = "item">The item.</param>
		///<exception cref="ArgumentNullException"> If <paramref name="item"/> is <c>null</c>.</exception>
		void Save(LegacyUrl item);

		/// <summary>
		/// 	Updates the specified <see cref="LegacyUrl"/> into the repository.
		/// </summary>
		/// <param name = "item">The item.</param>
		///<exception cref="ArgumentNullException"> If <paramref name="item"/> is <c>null</c>.</exception>
		void Update(LegacyUrl item);

		/// <summary>
		/// Deletes the specified <see cref="LegacyUrl"/> from the repository.
		/// </summary>
		/// <param name="item">The item.</param>
		///<exception cref="ArgumentNullException"> If <paramref name="item"/> is <c>null</c>.</exception>
		void Delete(LegacyUrl item);
	}
}